<?php
/**
 * Created by PhpStorm.
 * User: zyark
 * Date: 2018/4/6
 * Time: 17:12
 */

namespace app\admin\controller;


use app\admin\logic\TopicLogic;
use think\Controller;

class Test extends Controller
{
    public function import_file(){
        if(!$this->request->isCli()){
            die();
        }
        ignore_user_abort();
        set_time_limit(0);
        $logic = new TopicLogic();
        $file_name = '/www/RedEnvelope/public/uploads/excel/20180412/e41960c089dc96647b25f2255c4cb228.xls';
        $result = $logic->import($file_name);
        var_dump($result);
    }
}